const { getAnkingAjax } = require("@/http/modules/anking");
const { createAsyncThunk, createSlice } = require("@reduxjs/toolkit");

export const getAnkingInfo = createAsyncThunk("anking",async ()=>{
    const res = await getAnkingAjax();
    return res.list
})

const anking = createSlice({
    name:"anking",
    initialState:{
        ankingData:[]
    },
    extraReducers:{
        [getAnkingInfo.fulfilled](state,{payload}){
            state.ankingData = payload
        }
    }
})

export default anking.reducer